package  htmlAnalyze.htmlObject
{
	import htmlAnalyze.MakeHtmlArray;
	/**
	 * ...
	 * @author FireKnight
	 */
	public class HTMLDivElement extends Object 
	{
		protected var _className:String;
		protected var _innerText:String;
		protected var _id:String;
		protected var _title:String;
		protected var _innerHTML:String;
		protected var _children:Array;
		protected var _tagName:String;
		protected var _resource:Object;
		protected var _firstElementChild:Object;
		protected var _lastElementChild:Object;
		protected var _childElementCount:Number;
		protected var _firstChild:Object;
		protected var _lastChild:Object;
		protected var _nodeName:String;
		protected var _childrenNodes:Array;
		protected var _parentNode:HTMLDocument;
		protected var _clientWidth:Number;
		protected var _clientHeight:Number;
		public function HTMLDivElement(s:*) 
		{
			super();
			
			if (s.nodeName!="DIV" )
			{
				trace("object is not div document");
				return;
			}
			_resource = s;
			init(s);
		}
		
		protected function init(s:*):void
		{
			_innerHTML = s.innerHTML;
			_className = s.className;
			_innerText = s.innerText;
			_id = s.id;
			_title = s.title;
			_children = new Array();
			MakeHtmlArray.makeArray(_children, s.children);
			_tagName = s.tagName;
			_firstElementChild = s.firstElementChild;
			_lastElementChild = s.lastElementChild;
			_childElementCount = s.childElementCount;
			_firstChild = s.firstChild;
			_lastChild = s.lastChild;
			_nodeName = s.nodeName;
			_clientWidth = s.clientWidth;
			_clientHeight = s.clientHeight;
			_childrenNodes = new Array();
			MakeHtmlArray.makeArray(_childrenNodes, s.childNodes);
		}
		
		public function get innerHTML():String { return _innerHTML; }
		public function get className():String { return _className; }
		public function get innerText():String { return _innerText; }
		public function get id():String  { return _id; }
		public function get title():String  { return _title; }
		public function get children():Array  { return _children; }
		public function get lastElementChild():Object  { return _lastElementChild; }
		public function get firstElementChild():Object  { return _firstElementChild; }
		public function get childElementCount():Number  { return _childElementCount; }
		public function get clientWidth():Number  { return _clientWidth; }
		public function get clientHeight():Number  { return _clientHeight; }
		public function get firstChild():Object  { return _firstChild; }
		public function get lastChild():Object  { return _lastChild; }
		public function get nodeName():String  { return _nodeName; }
		public function get tagName():String  { return _tagName; }
		public function get childNodes():Array  { return _childrenNodes; }
		public function get resource():Object { return _resource};
		
		public function getElementsByTagName(s:String):Array
		{
			return MakeHtmlArray.makeArray(new Array(),_resource.getElementsByTagName(s));
		}
		

		public function  getElementsByClassName(s:String):Array
		{
			return  MakeHtmlArray.makeArray(new Array(),_resource.getElementsByClassName(s));
		}
		
		public function hasChildNodes():Boolean
		{
			return  _resource.hasChildNodes();
		}
	
		
	}
	/*
	 * align =
outerHTML =<div id="nav">
	<ul>
    	<li id="hrsy"><a href="http://www.huarong56.com"><span style="display: none; "></span></a></li>
        <li id="zjhr"><a href="http://www.huarong56.com/static/zoujinhuarong/huarongjianjie"><span style="display: none; "></span></a></li>
        <li id="hrgm"><a href="#"><span style="display: none; "></span></a></li>
        <li id="hrdt"><a href="http://www.huarong56.com/static/huarongdongtai"><span style="display: none; "></span></a></li>
        <li id="tgmt"><a href="http://www.huarong56.com/static/touguomeitikanhuarong"><span style="display: none; "></span></a></li>
        <li id="dgqf"><a href="http://59.111.16.14:8182" target="_blank"><span style="display: none; "></span></a></li>
        <li id="lxwm"><a href="http://www.huarong56.com/static/lianxiwomen" target="_blank"><span style="display: none; "></span></a></li>
    </ul>
</div>
className =
innerText =
id =nav
title =
lang =
dir =
innerHTML =
	<ul>
    	<li id="hrsy"><a href="http://www.huarong56.com"><span style="display: none; "></span></a></li>
        <li id="zjhr"><a href="http://www.huarong56.com/static/zoujinhuarong/huarongjianjie"><span style="display: none; "></span></a></li>
        <li id="hrgm"><a href="#"><span style="display: none; "></span></a></li>
        <li id="hrdt"><a href="http://www.huarong56.com/static/huarongdongtai"><span style="display: none; "></span></a></li>
        <li id="tgmt"><a href="http://www.huarong56.com/static/touguomeitikanhuarong"><span style="display: none; "></span></a></li>
        <li id="dgqf"><a href="http://59.111.16.14:8182" target="_blank"><span style="display: none; "></span></a></li>
        <li id="lxwm"><a href="http://www.huarong56.com/static/lianxiwomen" target="_blank"><span style="display: none; "></span></a></li>
    </ul>
contentEditable =false
tabIndex =-1
draggable =false
outerText =
children =[object HTMLCollection]
isContentEditable =false
style =[object CSSStyleDeclaration]
scrollLeft =0
clientWidth =1000
firstElementChild =[object HTMLUListElement]
scrollWidth =1000
clientLeft =0
offsetWidth =1000
offsetLeft =0
clientTop =0
lastElementChild =[object HTMLUListElement]
offsetParent =[object HTMLBodyElement]
nextElementSibling =[object HTMLDivElement]
tagName =DIV
previousElementSibling =[object HTMLDivElement]
clientHeight =81
childElementCount =1
offsetTop =100
offsetHeight =81
scrollTop =0
scrollHeight =81
previousSibling =[object Text]
parentNode =[object HTMLBodyElement]
lastChild =[object Text]
baseURI =http://www.huarong56.com/static/touguomeitikanhuarong/2011/1028/72.html
firstChild =[object Text]
nodeValue =null
textContent =
	
    	
        
        
        
        
        
        
    
nodeType =1
nodeName =DIV
prefix =null
childNodes =[object NodeList]
nextSibling =[object Text]
attributes =[object NamedNodeMap]
ownerDocument =[object HTMLDocument]
namespaceURI =http://www.w3.org/1999/xhtml
localName =div
parentElement =[object HTMLBodyElement]
insertAdjacentElement =function insertAdjacentElement() {
    [native code]
}
insertAdjacentHTML =function insertAdjacentHTML() {
    [native code]
}
insertAdjacentText =function insertAdjacentText() {
    [native code]
}
getElementsByTagName =function getElementsByTagName() {
    [native code]
}
getAttribute =function getAttribute() {
    [native code]
}
querySelectorAll =function querySelectorAll() {
    [native code]
}
webkitMatchesSelector =function webkitMatchesSelector() {
    [native code]
}
getElementsByClassName =function getElementsByClassName() {
    [native code]
}
contains =function contains() {
    [native code]
}
getBoundingClientRect =function getBoundingClientRect() {
    [native code]
}
querySelector =function querySelector() {
    [native code]
}
hasAttribute =function hasAttribute() {
    [native code]
}
getAttributeNode =function getAttributeNode() {
    [native code]
}
getAttributeNS =function getAttributeNS() {
    [native code]
}
getElementsByTagNameNS =function getElementsByTagNameNS() {
    [native code]
}
removeAttributeNS =function removeAttributeNS() {
    [native code]
}
getClientRects =function getClientRects() {
    [native code]
}
scrollByPages =function scrollByPages() {
    [native code]
}
setAttributeNode =function setAttributeNode() {
    [native code]
}
setAttributeNS =function setAttributeNS() {
    [native code]
}
hasAttributeNS =function hasAttributeNS() {
    [native code]
}
blur =function blur() {
    [native code]
}
scrollIntoViewIfNeeded =function scrollIntoViewIfNeeded() {
    [native code]
}
setAttribute =function setAttribute() {
    [native code]
}
scrollByLines =function scrollByLines() {
    [native code]
}
removeAttribute =function removeAttribute() {
    [native code]
}
setAttributeNodeNS =function setAttributeNodeNS() {
    [native code]
}
removeAttributeNode =function removeAttributeNode() {
    [native code]
}
getAttributeNodeNS =function getAttributeNodeNS() {
    [native code]
}
focus =function focus() {
    [native code]
}
scrollIntoView =function scrollIntoView() {
    [native code]
}
addEventListener =function addEventListener() {
    [native code]
}
appendChild =function appendChild() {
    [native code]
}
cloneNode =function cloneNode() {
    [native code]
}
removeEventListener =function removeEventListener() {
    [native code]
}
compareDocumentPosition =function compareDocumentPosition() {
    [native code]
}
insertBefore =function insertBefore() {
    [native code]
}
removeChild =function removeChild() {
    [native code]
}
hasAttributes =function hasAttributes() {
    [native code]
}
NOTATION_NODE =12
CDATA_SECTION_NODE =4
isSupported =function isSupported() {
    [native code]
}
ELEMENT_NODE =1
DOCUMENT_POSITION_DISCONNECTED =1
isEqualNode =function isEqualNode() {
    [native code]
}
ENTITY_NODE =6
TEXT_NODE =3
ENTITY_REFERENCE_NODE =5
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC =32
DOCUMENT_FRAGMENT_NODE =11
dispatchEvent =function dispatchEvent() {
    [native code]
}
PROCESSING_INSTRUCTION_NODE =7
isDefaultNamespace =function isDefaultNamespace() {
    [native code]
}
hasChildNodes =function hasChildNodes() {
    [native code]
}
DOCUMENT_POSITION_PRECEDING =2
normalize =function normalize() {
    [native code]
}
DOCUMENT_TYPE_NODE =10
COMMENT_NODE =8
replaceChild =function replaceChild() {
    [native code]
}
DOCUMENT_POSITION_FOLLOWING =4
ATTRIBUTE_NODE =2
DOCUMENT_POSITION_CONTAINED_BY =16
DOCUMENT_NODE =9
DOCUMENT_POSITION_CONTAINS =8
isSameNode =function isSameNode() {
    [native code]
}
lookupPrefix =function lookupPrefix() {
    [native code]
}
lookupNamespaceURI =function lookupNamespaceURI() {
    [native code]
}
	 **/

}